package com.duolia.update;

import com.duolia.bless.utils.ResourceUtils;

import android.content.Context;

public class UpdateTips {

	public static String getPrefsName(Context context) {
		String preference_name;
		try {
			int PREFS_NAME_ID = ResourceUtils.getStringId(context, "preference_name");
			preference_name = context.getResources().getString(PREFS_NAME_ID);
		} catch (Exception e) {
			preference_name = "auto_update";
		}
		return preference_name;
	}
	
	public static String getAppMac(Context context) {
		String app_mac;
		try {
			int PREFS_KEY_APP_MAC = ResourceUtils.getStringId(context, "preference_key_app_mac");
			app_mac = context.getResources().getString(PREFS_KEY_APP_MAC);
		} catch (Exception e) {
			app_mac = "app_mac";
		}
		return app_mac;
	}
	
	public static String getNextCheckUpdateTime(Context context) {
		String preference_key_next_check_update_time;
		try {
			int PREFS_KEY_NEXT_CHECK_UPDATE_TIME_ID = ResourceUtils.getStringId(context, "preference_key_next_check_update_time");
			preference_key_next_check_update_time = context.getResources().getString(PREFS_KEY_NEXT_CHECK_UPDATE_TIME_ID);
		} catch (Exception e) {
			preference_key_next_check_update_time = "next_check_update_time";
		}
		return preference_key_next_check_update_time;
	}
	
	public static String getCheckUpdateVersionCode(Context context) {
		String check_update_version_code;
		try {
			check_update_version_code = context.getResources().getString(ResourceUtils.getStringId(context, "preference_key_check_update_version_code"));
		} catch (Exception e) {
			check_update_version_code = "check_update_version_code";
		}
		return check_update_version_code;
	}
	
	public static String getSkipCheckUpdateVersionCode(Context context) {
		String skip_check_update_version_code;
		try {
			skip_check_update_version_code = context.getResources().getString(ResourceUtils.getStringId(context, "preference_key_skip_check_update_version_code"));
		} catch (Exception e) {
			skip_check_update_version_code = "skip_check_update_version_code";
		}
		return skip_check_update_version_code;
	}
	
	public static String getAutoUpdateUpdateTips(Context context) {
		String autoupdate_update_tips;
		try {
			autoupdate_update_tips = context.getResources().getString(ResourceUtils.getStringId(context, "autoupdate_update_tips"));
		} catch (Exception e) {
			autoupdate_update_tips = "update tips";
		}
		return autoupdate_update_tips;
	}
    
	public static String getAutoUpdateConfirm(Context context) {
		String autoupdate_confirm;
		try {
			autoupdate_confirm = context.getResources().getString(ResourceUtils.getStringId(context, "autoupdate_confirm"));
		} catch (Exception e) {
			autoupdate_confirm = "confirm";
		}
		return autoupdate_confirm;
	}
	
	public static String getAutoUpdateCancel(Context context) {
		String autoupdate_cancel;
		try {
			autoupdate_cancel = context.getResources().getString(ResourceUtils.getStringId(context, "autoupdate_cancel"));
		} catch (Exception e) {
			autoupdate_cancel = "cancel";
		}
		return autoupdate_cancel;
	}
	
	public static String getAutoUpdateSkip(Context context) {
		String autoupdate_skip;
		try {
			autoupdate_skip = context.getResources().getString(ResourceUtils.getStringId(context, "autoupdate_skip"));
		} catch (Exception e) {
			autoupdate_skip = "skip";
		}
		return autoupdate_skip;
	}
	

}
